<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>CCSpriteFrame Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">Cocos2D </a></h1>
				<a id="developerHome" href="../index.html">3.2.0</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">CCSpriteFrame Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	<option value="properties">Properties</option>
	
	<option value="//api/name/offset">&nbsp;&nbsp;&nbsp;&nbsp;offset</option>
	
	<option value="//api/name/originalSize">&nbsp;&nbsp;&nbsp;&nbsp;originalSize</option>
	
	<option value="//api/name/rect">&nbsp;&nbsp;&nbsp;&nbsp;rect</option>
	
	<option value="//api/name/rotated">&nbsp;&nbsp;&nbsp;&nbsp;rotated</option>
	
	<option value="//api/name/texture">&nbsp;&nbsp;&nbsp;&nbsp;texture</option>
	
	<option value="//api/name/textureFilename">&nbsp;&nbsp;&nbsp;&nbsp;textureFilename</option>
	
	
	
	
	<option value="class_methods">Class Methods</option>
	
	<option value="//api/name/frameWithImageNamed:">&nbsp;&nbsp;&nbsp;&nbsp;+ frameWithImageNamed:</option>
	
	<option value="//api/name/frameWithTexture:rectInPixels:rotated:offset:originalSize:">&nbsp;&nbsp;&nbsp;&nbsp;+ frameWithTexture:rectInPixels:rotated:offset:originalSize:</option>
	
	<option value="//api/name/frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:">&nbsp;&nbsp;&nbsp;&nbsp;+ frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:</option>
	
	
	
	
	<option value="instance_methods">Instance Methods</option>
	
	<option value="//api/name/initWithTexture:rectInPixels:rotated:offset:originalSize:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithTexture:rectInPixels:rotated:offset:originalSize:</option>
	
	<option value="//api/name/initWithTextureFilename:rectInPixels:rotated:offset:originalSize:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithTextureFilename:rectInPixels:rotated:offset:originalSize:</option>
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>




<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Accessing Sprite Frame Attributes">Accessing Sprite Frame Attributes</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Creating a CCSpriteFrame Object">Creating a CCSpriteFrame Object</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Initializing a CCSpriteFrame Object">Initializing a CCSpriteFrame Object</a></span></li>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/offset">offset</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/originalSize">originalSize</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rect">rect</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rotated">rotated</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/texture">texture</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/textureFilename">textureFilename</a></span></li>
	
</ul></li>



<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/frameWithImageNamed:">frameWithImageNamed:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/frameWithTexture:rectInPixels:rotated:offset:originalSize:">frameWithTexture:rectInPixels:rotated:offset:originalSize:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:">frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:</a></span></li>
	
</ul></li>



<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithTexture:rectInPixels:rotated:offset:originalSize:">initWithTexture:rectInPixels:rotated:offset:originalSize:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithTextureFilename:rectInPixels:rotated:offset:originalSize:">initWithTextureFilename:rectInPixels:rotated:offset:originalSize:</a></span></li>
	
</ul></li>


			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="CCSpriteFrame Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">CCSpriteFrame Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value">NSObject</td>
</tr><tr>
	<td class="specification-title">Conforms to</td>
	<td class="specification-value">NSCopying</td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">CCSpriteFrame.h</td>
</tr>
						</tbody></table></div>
					
                    
                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>A CCSpriteFrame contains the texture and rectangle of the texture to be used by a CCSprite.</p>

<p>You can easily modify the sprite frame of a CCSprite using the following handy method:</p>

<p>CCSpriteFrame *frame = [CCSpriteFrame frameWithImageNamed:@&ldquo;jump.png&rdquo;];
[sprite setSpriteFrame:frame];</p>
					</div>
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						<a title="Accessing Sprite Frame Attributes" name="task_Accessing Sprite Frame Attributes"></a>
						<h3 class="subsubtitle task-title">Accessing Sprite Frame Attributes</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/rect">&nbsp;&nbsp;rect</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/rotated">&nbsp;&nbsp;rotated</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/offset">&nbsp;&nbsp;offset</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/originalSize">&nbsp;&nbsp;originalSize</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/texture">&nbsp;&nbsp;texture</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/textureFilename">&nbsp;&nbsp;textureFilename</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="Creating a CCSpriteFrame Object" name="task_Creating a CCSpriteFrame Object"></a>
						<h3 class="subsubtitle task-title">Creating a CCSpriteFrame Object</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/frameWithImageNamed:">+&nbsp;frameWithImageNamed:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/frameWithTexture:rectInPixels:rotated:offset:originalSize:">+&nbsp;frameWithTexture:rectInPixels:rotated:offset:originalSize:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:">+&nbsp;frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:</a></code>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Initializing a CCSpriteFrame Object" name="task_Initializing a CCSpriteFrame Object"></a>
						<h3 class="subsubtitle task-title">Initializing a CCSpriteFrame Object</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/initWithTexture:rectInPixels:rotated:offset:originalSize:">&ndash;&nbsp;initWithTexture:rectInPixels:rotated:offset:originalSize:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/initWithTextureFilename:rectInPixels:rotated:offset:originalSize:">&ndash;&nbsp;initWithTextureFilename:rectInPixels:rotated:offset:originalSize:</a></code>
	</span>
	
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Properties" name="properties"></a>
						<h2 class="subtitle subtitle-methods">Properties</h2>
						
						<div class="section-method">
	<a name="//api/name/offset" title="offset"></a>
	<h3 class="subsubtitle method-title">offset</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Offset of the frame in points.  If it is updated, then offsetInPixels will also be updated.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) CGPoint offset</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/originalSize" title="originalSize"></a>
	<h3 class="subsubtitle method-title">originalSize</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Original size of the trimmed image in points.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) CGSize originalSize</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/rect" title="rect"></a>
	<h3 class="subsubtitle method-title">rect</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Rectangle of the frame in points. If it is updated, then rectInPixels will also be updated.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) CGRect rect</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/rotated" title="rotated"></a>
	<h3 class="subsubtitle method-title">rotated</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Is the frame rectangle is rotated.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) BOOL rotated</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/texture" title="texture"></a>
	<h3 class="subsubtitle method-title">texture</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Texture of the frame.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong, readonly) CCTexture *texture</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/textureFilename" title="textureFilename"></a>
	<h3 class="subsubtitle method-title">textureFilename</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Texture image file name, when created from a <a href="#//api/name/texture">texture</a> image.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong, readonly) NSString *textureFilename</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					<div class="section section-methods">
						<a title="Class Methods" name="class_methods"></a>
						<h2 class="subtitle subtitle-methods">Class Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/frameWithImageNamed:" title="frameWithImageNamed:"></a>
	<h3 class="subsubtitle method-title">frameWithImageNamed:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Create and return a sprite frame object from the specified image name.  On first attempt it will check CCSpriteFrameCache and if not available will then try and create from an image file of the same name.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (id)frameWithImageNamed:(NSString *)<em>imageName</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>imageName</em></dt>
			<dd><p>Image name.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The CCSpriteFrame Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/frameWithTexture:rectInPixels:rotated:offset:originalSize:" title="frameWithTexture:rectInPixels:rotated:offset:originalSize:"></a>
	<h3 class="subsubtitle method-title">frameWithTexture:rectInPixels:rotated:offset:originalSize:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Create and return a sprite frame object from the specified <a href="#//api/name/texture">texture</a>, <a href="#//api/name/texture">texture</a> rectangle, rotation status, <a href="#//api/name/offset">offset</a> and <a href="#//api/name/originalSize">originalSize</a> values.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (id)frameWithTexture:(CCTexture *)<em>texture</em> rectInPixels:(CGRect)<em>rect</em> rotated:(BOOL)<em>rotated</em> offset:(CGPoint)<em>offset</em> originalSize:(CGSize)<em>originalSize</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>texture</em></dt>
			<dd><p>Texture to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>rect</em></dt>
			<dd><p>Texture rectangle (in pixels) to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>rotated</em></dt>
			<dd><p>Is rectangle <a href="#//api/name/rotated">rotated</a>?</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>offset</em></dt>
			<dd><p>Offset (in pixels) to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>originalSize</em></dt>
			<dd><p>Original size (in pixels) before being trimmed.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The CCSpriteFrame Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:" title="frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:"></a>
	<h3 class="subsubtitle method-title">frameWithTextureFilename:rectInPixels:rotated:offset:originalSize:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Create and return a sprite frame object from the specified <a href="#//api/name/texture">texture</a> file name, <a href="#//api/name/texture">texture</a> rectangle, rotation status, <a href="#//api/name/offset">offset</a> and <a href="#//api/name/originalSize">originalSize</a> values.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>+ (id)frameWithTextureFilename:(NSString *)<em>filename</em> rectInPixels:(CGRect)<em>rect</em> rotated:(BOOL)<em>rotated</em> offset:(CGPoint)<em>offset</em> originalSize:(CGSize)<em>originalSize</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>filename</em></dt>
			<dd><p>Image file name to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>rect</em></dt>
			<dd><p>Texture rectangle (in pixels) to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>rotated</em></dt>
			<dd><p>Is rectangle <a href="#//api/name/rotated">rotated</a>?</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>offset</em></dt>
			<dd><p>Offset (in pixels) to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>originalSize</em></dt>
			<dd><p>Original size (in pixels) before being trimmed.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The CCSpriteFrame Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					<div class="section section-methods">
						<a title="Instance Methods" name="instance_methods"></a>
						<h2 class="subtitle subtitle-methods">Instance Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/initWithTexture:rectInPixels:rotated:offset:originalSize:" title="initWithTexture:rectInPixels:rotated:offset:originalSize:"></a>
	<h3 class="subsubtitle method-title">initWithTexture:rectInPixels:rotated:offset:originalSize:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Initializes and returns a sprite frame object from the specified <a href="#//api/name/texture">texture</a>, <a href="#//api/name/texture">texture</a> rectangle, rotation status, <a href="#//api/name/offset">offset</a> and <a href="#//api/name/originalSize">originalSize</a> values.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (id)initWithTexture:(CCTexture *)<em>texture</em> rectInPixels:(CGRect)<em>rect</em> rotated:(BOOL)<em>rotated</em> offset:(CGPoint)<em>offset</em> originalSize:(CGSize)<em>originalSize</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>texture</em></dt>
			<dd><p>Texture to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>rect</em></dt>
			<dd><p>Texture rectangle (in pixels) to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>rotated</em></dt>
			<dd><p>Is rectangle <a href="#//api/name/rotated">rotated</a>?</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>offset</em></dt>
			<dd><p>Offset (in pixels) to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>originalSize</em></dt>
			<dd><p>Original size (in pixels) before being trimmed.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>An initialized CCSpriteFrame Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/initWithTextureFilename:rectInPixels:rotated:offset:originalSize:" title="initWithTextureFilename:rectInPixels:rotated:offset:originalSize:"></a>
	<h3 class="subsubtitle method-title">initWithTextureFilename:rectInPixels:rotated:offset:originalSize:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Initializes and returns a sprite frame object from the specified <a href="#//api/name/texture">texture</a> file name, <a href="#//api/name/texture">texture</a> rectangle, rotation status, <a href="#//api/name/offset">offset</a> and <a href="#//api/name/originalSize">originalSize</a> values.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (id)initWithTextureFilename:(NSString *)<em>filename</em> rectInPixels:(CGRect)<em>rect</em> rotated:(BOOL)<em>rotated</em> offset:(CGPoint)<em>offset</em> originalSize:(CGSize)<em>originalSize</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>filename</em></dt>
			<dd><p>Image file name to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>rect</em></dt>
			<dd><p>Texture rectangle (in pixels) to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>rotated</em></dt>
			<dd><p>Is rectangle <a href="#//api/name/rotated">rotated</a>?</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>offset</em></dt>
			<dd><p>Offset (in pixels) to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>originalSize</em></dt>
			<dd><p>Original size (in pixels) before being trimmed.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>An initialized CCSpriteFrame Object.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCSpriteFrame.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
                    
                    
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2014 3.2.0. All rights reserved. (Last updated: 2014-08-12)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 963)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>